@extends('layouts.app')

@section('content')
    <div class="container">
        <div class="container-fluid">
        @include('layouts._success')
            <!-- start page title -->
            <div class="row">
                <div class="col-12">
                    <div class="page-title-box">
                        <div class="page-title-right">
                            <ol class="breadcrumb m-0">
                                <li class="breadcrumb-item"><a href="{{ route('bugs.create') }}">反馈bug</a></li>
                                <li class="breadcrumb-item"><a href="">其他</a></li>
                            </ol>
                        </div>
                        <h4 class="page-title">BUG时间线</h4>
                    </div>
                </div>
            </div>
            <!-- end page title -->

            <div class="row">
                <div class="col-12">
                    <div class="timeline " dir="ltr">
                        <article class="timeline-item">
                            <h2 class="m-0 d-none">&nbsp;</h2>
                            <div class="time-show mt-0">
                                <a href="#" class="btn btn-danger width-lg">Starting</a>
                            </div>
                        </article>
                        @foreach($data as $num=>$item)
                            <article @if($num%2=='0') class="timeline-item timeline-item-left"
                                     @elseif($num%2!='0') class="timeline-item" @endif>
                                <div class="timeline-desk">
                                    <div class="timeline-box">
                                        <span class="arrow-alt"></span>
                                        <span class="timeline-icon"><i class="mdi mdi-adjust"></i></span>
                                        <h4 class="mt-0 font-16"><a href="{{route('bugs.show',$item->id)}}">{{ $item->title }}</a></h4>
                                        <p class="text-muted">
                                            <small>{{ $item->created_at }}</small>
                                        </p>
                                        <p class="mb-0">
                                            @if($num%2!='0')
                                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                            @endif
                                            {{str_limit($item->content, 128, '......')}}</p>
                                    </div>
                                </div>
                            </article>
                        @endforeach
                    </div>
                    <!-- end timeline -->
                </div> <!-- end col -->
            </div>
            <!-- end row -->

        </div>
    </div>
@endsection
